import pygame.image as pi
from res.glo import src
from res.conf import bulletspeed , bulletdamage
from lib.ZSprite import ZSprite


class Bullet(ZSprite):
    def __init__(self):
        super(Bullet, self).__init__()
        self.image = pi.load(src['image']['bullet'])
        self.rect = self.image.get_rect()
        self.speed = bulletspeed
        self.hit = bulletdamage

    def draw(self):
        self.screen.blit(self.image , self._pos)

    def update(self):
        self.rect.y -= self.speed
